home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mgr / vdimgr.zoo / ash / ash.diffs
Encoding:
Text File  |  1993-03-16  |  9.2 KB  |  343 lines

  1. RCS file: /net/acae127/home/bammi/etc/src/master/ash/error.c,v
  2. retrieving revision 1.1
  3. diff -c -r1.1 error.c
  4. *** 1.1    1992/10/07 04:18:30
  5. --- error.c    1992/11/19 23:22:39
  6. ***************
  7. *** 173,181 ****
  8. --- 173,189 ----
  9.       char *msg;        /* text describing the error */
  10.   };
  11.   
  12. + #ifdef atarist
  13.   
  14.   #define ALL (E_OPEN|E_CREAT|E_EXEC)
  15. + #ifndef ERROR
  16. + #define ERROR EERROR
  17. + #endif
  18.   
  19. + #ifndef EWRITF
  20. + #define EWRITF EWRITE
  21. + #endif
  22.   STATIC const struct errname errormsg[] = {
  23.       ERROR, ALL,    "generic error",
  24.       EDRVNR, ALL,    "drive not ready",
  25. ***************
  26. *** 213,219 ****
  27.       ERANGE, ALL,    "math range error",
  28.       EDOM, ALL,    "math domain error"
  29.   };
  30.   
  31.   /*
  32.    * Return a string describing an error.  The returned string may be a
  33. --- 221,229 ----
  34.       ERANGE, ALL,    "math range error",
  35.       EDOM, ALL,    "math domain error"
  36.   };
  37. ! #else
  38. ! STATIC const struct errname errormsg[] = {  0, 0, 0 };
  39. ! #endif
  40.   
  41.   /*
  42.    * Return a string describing an error.  The returned string may be a
  43. ***************
  44. *** 223,229 ****
  45.   
  46.   char *
  47.   errmsg(e, action) {
  48. !     struct errname const *ep;
  49.       static char buf[12];
  50.   
  51.       for (ep = errormsg ; ep->errcode ; ep++) {
  52. --- 233,239 ----
  53.   
  54.   char *
  55.   errmsg(e, action) {
  56. !     struct errname *ep;
  57.       static char buf[12];
  58.   
  59.       for (ep = errormsg ; ep->errcode ; ep++) {
  60. ===================================================================
  61. RCS file: /net/acae127/home/bammi/etc/src/master/ash/eval.h,v
  62. retrieving revision 1.1
  63. diff -c -r1.1 eval.h
  64. *** 1.1    1992/10/07 04:18:30
  65. --- eval.h    1992/11/19 23:22:39
  66. ***************
  67. *** 51,57 ****
  68. --- 51,59 ----
  69.   
  70.   #ifdef __STDC__
  71.   void evalstring(char *);
  72. + #ifndef __hpux
  73.   union node;    /* BLETCH for ansi C */
  74. + #endif
  75.   void evaltree(union node *, int);
  76.   void evalbackcmd(union node *, struct backcmd *);
  77.   #else
  78. ===================================================================
  79. RCS file: /net/acae127/home/bammi/etc/src/master/ash/exec.c,v
  80. retrieving revision 1.1
  81. diff -c -r1.1 exec.c
  82. *** 1.1    1992/10/07 04:18:30
  83. --- exec.c    1992/10/07 22:47:55
  84. ***************
  85. *** 145,150 ****
  86. --- 145,153 ----
  87.   #else
  88.                   tryexec(cmdname, argv, envp);
  89.   #endif
  90. + #ifndef ENOTDIR
  91. + #define ENOTDIR EPATH
  92. + #endif
  93.                   if (errno != ENOENT && errno != ENOTDIR)
  94.                       e = errno;
  95.               }
  96. ===================================================================
  97. RCS file: /net/acae127/home/bammi/etc/src/master/ash/expand.h,v
  98. retrieving revision 1.1
  99. diff -c -r1.1 expand.h
  100. *** 1.1    1992/10/07 04:18:30
  101. --- expand.h    1992/11/19 23:22:39
  102. ***************
  103. *** 48,54 ****
  104. --- 48,56 ----
  105.   };
  106.   
  107.   #ifdef __STDC__
  108. + #ifndef __hpux
  109.   union node;
  110. + #endif
  111.   void expandarg(union node *, struct arglist *, int);
  112.   void expandhere(union node *, int);
  113.   int patmatch(char *, char *);
  114. ===================================================================
  115. RCS file: /net/acae127/home/bammi/etc/src/master/ash/input.c,v
  116. retrieving revision 1.1
  117. diff -c -r1.1 input.c
  118. *** 1.1    1992/10/07 04:18:30
  119. --- input.c    1993/02/25 23:11:36
  120. ***************
  121. *** 181,187 ****
  122. --- 181,212 ----
  123.       flushout(&errout);
  124.   retry:
  125.       p = parsenextc = parsefile->buf;
  126. + #if defined(WANT_READLINE)
  127. +     if(parsefile->fd == 0)
  128. +     {
  129. +           extern char * readline();
  130. +           extern void add_history();
  131. +           char *s = readline("");
  132. +               if(s)
  133. +           {
  134. +         add_history(s);
  135. +         if((i = strlen(s)+1) > BUFSIZ)
  136. +             {
  137. +             s[BUFSIZ-1] = '\0';
  138. +             i = BUFSIZ;
  139. +          }
  140. +         strcpy(p, s);
  141. +         p[i-1] = '\n';
  142. +         free(s);
  143. +           }
  144. +           else
  145. +         i = 0;
  146. +         }
  147. +     else
  148. +           i = read(parsefile->fd, p, BUFSIZ);
  149. + #else
  150.       i = read(parsefile->fd, p, BUFSIZ);
  151. + #endif
  152.       if (i <= 0) {
  153.                   if (i < 0) {
  154.                           if (errno == EINTR)
  155. ===================================================================
  156. RCS file: /net/acae127/home/bammi/etc/src/master/ash/main.c,v
  157. retrieving revision 1.1
  158. diff -c -r1.1 main.c
  159. *** 1.1    1992/10/07 04:18:30
  160. --- main.c    1993/02/25 23:11:37
  161. ***************
  162. *** 151,157 ****
  163. --- 151,161 ----
  164.           read_profile("/etc/profile");
  165.   state1:
  166.           state = 2;
  167. + #ifndef atarist
  168.           read_profile(".profile");
  169. + #else
  170. +         read_profile("profile");
  171. + #endif
  172.       } else if ((sflag || minusc) && (shinit = getenv("SHINIT")) != NULL) {
  173.           state = 2;
  174.           evalstring(shinit);
  175. ===================================================================
  176. RCS file: /net/acae127/home/bammi/etc/src/master/ash/makefile,v
  177. retrieving revision 1.1
  178. diff -c -r1.1 makefile
  179. *** 1.1    1992/10/07 04:18:30
  180. --- makefile    1993/02/25 23:11:38
  181. ***************
  182. *** 1,8 ****
  183.   #    %W% (Berkeley) %G% 
  184. ! CC=gcc
  185.   PROG=sh.ttp
  186.   STUBS=builtins cd dirent echo error eval exec expand input jobs mail \
  187. !   main memalloc miscblti mystring nodes options parser redir show signames \
  188.     syntax trap output var init
  189.   OBJS=$(addsuffix .o, $(STUBS))
  190.   SRCS=$(addsuffix .c, $(STUBS))
  191. --- 1,8 ----
  192.   #    %W% (Berkeley) %G% 
  193. ! CC=cgcc -mint -mbaserel -mpcrel
  194.   PROG=sh.ttp
  195.   STUBS=builtins cd dirent echo error eval exec expand input jobs mail \
  196. !   main memalloc miscbltin mystring nodes options parser redir show signames \
  197.     syntax trap output var init
  198.   OBJS=$(addsuffix .o, $(STUBS))
  199.   SRCS=$(addsuffix .c, $(STUBS))
  200. ***************
  201. *** 10,18 ****
  202.     input.h jobs.h machdep.h mail.h main.h memalloc.h mystring.h nodes.h \
  203.     options.h output.h parser.h redir.h shell.h signames.h \
  204.     syntax.h trap.h var.h
  205. ! CFLAGS=-DSHELL -I. -O -fstrength-reduce -finline-functions -fomit-frame-pointer
  206. ! LDFLAGS=
  207. ! LOADLIBES=
  208.   FUNCS=$(addprefix funcs/, cmv dirs kill login newgrp popd pushd suspend)
  209.   DOCS=dump dinfo lastdump sh.1 tour test.1 readme.st copying copying.sh
  210.   ORGFILES=makefile.org token.def mktokens mkbuilti builtins.def mkinit.c \
  211. --- 10,18 ----
  212.     input.h jobs.h machdep.h mail.h main.h memalloc.h mystring.h nodes.h \
  213.     options.h output.h parser.h redir.h shell.h signames.h \
  214.     syntax.h trap.h var.h
  215. ! CFLAGS=-DSHELL -I. -O2 -fstrength-reduce -fomit-frame-pointer -DWANT_READLINE
  216. ! LDFLAGS= -v
  217. ! LOADLIBES= ../editline/bmlibedit.olb -lbmtermcap
  218.   FUNCS=$(addprefix funcs/, cmv dirs kill login newgrp popd pushd suspend)
  219.   DOCS=dump dinfo lastdump sh.1 tour test.1 readme.st copying copying.sh
  220.   ORGFILES=makefile.org token.def mktokens mkbuilti builtins.def mkinit.c \
  221. ===================================================================
  222. RCS file: /net/acae127/home/bammi/etc/src/master/ash/makefile.org,v
  223. retrieving revision 1.1
  224. diff -c -r1.1 makefile.org
  225. *** 1.1    1992/10/07 04:18:30
  226. --- makefile.org    1992/10/07 04:42:41
  227. ***************
  228. *** 46,48 ****
  229. --- 46,54 ----
  230.   
  231.   mksyntax: mksyntax.c parser.h
  232.       $(CC) $(CFLAGS) mksyntax.c -o $@
  233. + clean:
  234. +     rm -f $(OBJS) $(CLEANFILES)
  235. + realclean: clean
  236. +     rm -f sh report core
  237. ===================================================================
  238. RCS file: /net/acae127/home/bammi/etc/src/master/ash/mystring.h,v
  239. retrieving revision 1.1
  240. diff -c -r1.1 mystring.h
  241. *** 1.1    1992/10/07 04:18:30
  242. --- mystring.h    1992/10/07 22:48:11
  243. ***************
  244. *** 47,57 ****
  245. --- 47,61 ----
  246.   int prefix(const char *, const char *);
  247.   int number(const char *);
  248.   int is_number(const char *);
  249. + #if 0
  250.   int strcmp(const char *, const char *);    /* from C library */
  251.   char *strcpy(char *, const char *);    /* from C library */
  252.   int strlen(const char *);        /* from C library */
  253.   char *strcat(char *, const char *);    /* from C library */
  254.   #else
  255. + #include <string.h>
  256. + #endif
  257. + #else
  258.   void scopyn();
  259.   char *strchr();
  260.   void mybcopy();
  261. ===================================================================
  262. RCS file: /net/acae127/home/bammi/etc/src/master/ash/redir.h,v
  263. retrieving revision 1.1
  264. diff -c -r1.1 redir.h
  265. *** 1.1    1992/10/07 04:18:30
  266. --- redir.h    1992/11/19 23:22:39
  267. ***************
  268. *** 41,47 ****
  269. --- 41,49 ----
  270.   #define REDIR_BACKQ 02        /* save the command output in memory */
  271.   
  272.   #ifdef __STDC__
  273. + #ifndef __hpux
  274.   union node;
  275. + #endif
  276.   void redirect(union node *, int);
  277.   void popredir(void);
  278.   void clearredir(void);
  279. ===================================================================
  280. RCS file: /net/acae127/home/bammi/etc/src/master/ash/shell.h,v
  281. retrieving revision 1.1
  282. diff -c -r1.1 shell.h
  283. *** 1.1    1992/10/07 04:18:30
  284. --- shell.h    1992/10/07 04:42:41
  285. ***************
  286. *** 55,61 ****
  287.   
  288.   
  289.   #define JOBS 1
  290. ! #define SYMLINKS 0
  291.   #define DIRENT 1
  292.   #define UDIR 0
  293.   #define ATTY 0
  294. --- 55,61 ----
  295.   
  296.   
  297.   #define JOBS 1
  298. ! #define SYMLINKS 1
  299.   #define DIRENT 1
  300.   #define UDIR 0
  301.   #define ATTY 0
  302. ===================================================================
  303. RCS file: /net/acae127/home/bammi/etc/src/master/ash/var.c,v
  304. retrieving revision 1.1
  305. diff -c -r1.1 var.c
  306. *** 1.1    1992/10/07 04:18:30
  307. --- var.c    1992/11/19 23:22:39
  308. ***************
  309. *** 87,92 ****
  310. --- 87,96 ----
  311.   struct var vterm;
  312.   #endif
  313.   
  314. + #ifdef __MBASE__
  315. + #define const        /* cannot reference data segment in text structures */
  316. + #endif
  317.   const struct varinit varinit[] = {
  318.   #if ATTY
  319.       {&vatty,    VSTRFIXED|VTEXTFIXED|VUNSET,    "ATTY="},
  320. ===================================================================
  321. RCS file: /net/acae127/home/bammi/etc/src/master/ash/var.h,v
  322. retrieving revision 1.1
  323. diff -c -r1.1 var.h
  324. *** 1.1    1992/10/07 04:18:30
  325. --- var.h    1992/11/19 23:22:39
  326. ***************
  327. *** 105,111 ****
  328. --- 105,113 ----
  329.   void initvar();
  330.   void setvar(char *, char *, int);
  331.   void setvareq(char *, int);
  332. + #ifndef __hpux
  333.   struct strlist;
  334. + #endif
  335.   void listsetvar(struct strlist *);
  336.   char *lookupvar(char *);
  337.   char *bltinlookup(char *, int);
  338.